package cc.customer.cusDynamic.domain;

import cc.customer.common.domain.MRecord;
import cc.customer.common.utils.DateUtil;

import javax.persistence.*;
import java.util.List;
import java.util.Objects;

@Table(name = "c_dynamic")
public class CusDynamic {
    @Id
    @Column(name = "dy_id")
    private Long dyId;

    /**
     * 录音文件id
     */
    @Column(name = "dy_m_id")
    private Long dyMId;

    @Column(name = "dy_uuid")
    private String dyUuid ;

    /**
     * 客户id
     */
    @Column(name = "dy_cus_uuid")
    private String dyCusUuid;

    /**
     * 操作类型
     */
    @Column(name = "dy_type")
    private String dyType;

    /**
     * 操作人
     */
    @Column(name = "dy_creator")
    private String dyCreator;

    /**
     * 操作时间
     */
    @Column(name = "dy_creattime")
    private String dyCreattime = DateUtil.getCurrentDate("yyyy-MM-dd HH:mm:ss");

    /**
     * 干了什么
     */
    @Column(name = "dy_content")
    private String dyContent;

    /**
     * 资源类型
     */
    @Column(name = "dy_source_type")
    private String dySourceType;

    /**
     * 转让操作接收人
     */
    @Column(name = "dy_zhuan_userid")
    private String dyZhuanUserid;

    /**
     * 共享操作接收人
     */
    @Column(name = "dy_share_userid")
    private String dyShareUserid;

    /**
     * 设置的标签id变更后
     */
    @Column(name = "dy_label_after")
    private String dyLabelAfter;

    /**
     * 设置的标签id变更后
     */
    @Column(name = "dy_label_before")
    private String dyLabelBefore;

    /**
     * 分配操作的接收人
     */
    @Column(name = "dy_dis_userid")
    private String dyDisUserid;

    /**
     * 客户跟进
     */
    @Column(name = "dy_follow")
    private String dyFollowContent;

    /**上传客户的录音文件**/
    @Column(name = "dy_url")
    private String dyUrl;

    /**客户名称**/
    @Column(name = "dy_cus_name")
    private String dyCusName;

    @Transient
    private String dyMPath;


    @Transient
    private String dyCreatorName;

    @Transient
    private String dyZhuanName;

    @Transient
    private String dyDisName;

    @Transient
    private String starttime;
    @Transient
    private String endtime;
    @Transient
    private String dyUsername;
    @Transient
    private List<String> creatorList;

    @Transient
    private MRecord dyRecord;

    public MRecord getDyRecord() {
        return dyRecord;
    }

    public void setDyRecord(MRecord dyRecord) {
        this.dyRecord = dyRecord;
    }

    public List<String> getCreatorList() {
        return creatorList;
    }

    public void setCreatorList(List<String> creatorList) {
        this.creatorList = creatorList;
    }

    public String getDyUsername() {
            return dyUsername;
        }

    public void setDyUsername(String dyUsername) {
        this.dyUsername = dyUsername;
    }

    public String getStarttime() {
            return starttime;
        }

    public void setStarttime(String starttime) {
        this.starttime = starttime;
    }

    public String getEndtime() {
        return endtime;
    }

    public void setEndtime(String endtime) {
        this.endtime = endtime;
    }

    public String getDyUrl() {
        return dyUrl;
    }

    public void setDyUrl(String dyUrl) {
        this.dyUrl = dyUrl;
    }

    /**
     * @return dy_id
     */
    public Long getDyId() {
        return dyId;
    }

    /**
     * @param dyId
     */
    public void setDyId(Long dyId) {
        this.dyId = dyId;
    }

    /**
     * @return dy_uuid
     */
    public String getDyUuid() {
        return dyUuid;
    }

    /**
     * @param dyUuid
     */
    public void setDyUuid(String dyUuid) {
        this.dyUuid = dyUuid == null ? null : dyUuid.trim();
    }

    public String getDyCusUuid() {
        return dyCusUuid;
    }

    public void setDyCusUuid(String dyCusUuid) {
        this.dyCusUuid = dyCusUuid;
    }

    /**
     * 获取操作类型
     *
     * @return dy_type - 操作类型
     */
    public String getDyType() {
        return dyType;
    }

    /**
     * 设置操作类型
     *
     * @param dyType 操作类型
     */
    public void setDyType(String dyType) {
        this.dyType = dyType == null ? null : dyType.trim();
    }

    /**
     * 获取操作人
     *
     * @return dy_creator - 操作人
     */
    public String getDyCreator() {
        return dyCreator;
    }

    /**
     * 设置操作人
     *
     * @param dyCreator 操作人
     */
    public void setDyCreator(String dyCreator) {
        this.dyCreator = dyCreator == null ? null : dyCreator.trim();
    }

    /**
     * 获取操作时间
     *
     * @return dy_creattime - 操作时间
     */
    public String getDyCreattime() {
        return dyCreattime;
    }

    /**
     * 设置操作时间
     *
     * @param dyCreattime 操作时间
     */
    public void setDyCreattime(String dyCreattime) {
        this.dyCreattime = dyCreattime == null ? null : dyCreattime.trim();
    }

    /**
     * 获取干了什么
     *
     * @return dy_content - 干了什么
     */
    public String getDyContent() {
        return dyContent;
    }

    /**
     * 设置干了什么
     *
     * @param dyContent 干了什么
     */
    public void setDyContent(String dyContent) {
        this.dyContent = dyContent == null ? null : dyContent.trim();
    }

    public String getDySourceType() {return dySourceType;}

    public void setDySourceType(String dySourceType) {this.dySourceType = dySourceType;}

    public String getDyZhuanUserid() {
        return dyZhuanUserid;
    }

    public void setDyZhuanUserid(String dyZhuanUserid) {
        this.dyZhuanUserid = dyZhuanUserid;
    }

    public String getDyShareUserid() {
        return dyShareUserid;
    }

    public void setDyShareUserid(String dyShareUserid) {
        this.dyShareUserid = dyShareUserid;
    }

    public String getDyLabelAfter() {
    return dyLabelAfter;
}

    public void setDyLabelAfter(String dyLabelAfter) {
        this.dyLabelAfter = dyLabelAfter;
    }

    public String getDyLabelBefore() {
        return dyLabelBefore;
    }

    public void setDyLabelBefore(String dyLabelBefore) {
        this.dyLabelBefore = dyLabelBefore;
    }

    public String getDyDisUserid() {
            return dyDisUserid;
    }

    public void setDyDisUserid(String dyDisUserid) {
        this.dyDisUserid = dyDisUserid;
    }

    public String getDyFollowContent() {
        return dyFollowContent;
    }

    public void setDyFollowContent(String dyFollowContent) {
        this.dyFollowContent = dyFollowContent;
    }

    public String getDyCreatorName() {
        return dyCreatorName;
    }

    public void setDyCreatorName(String dyCreatorName) {
        this.dyCreatorName = dyCreatorName;
    }

    public String getDyZhuanName() {
        return dyZhuanName;
    }

    public void setDyZhuanName(String dyZhuanName) {
        this.dyZhuanName = dyZhuanName;
    }

    public String getDyDisName() {
        return dyDisName;
    }

    public void setDyDisName(String dyDisName) {
        this.dyDisName = dyDisName;
    }

    public Long getDyMId() {
        return dyMId;
    }

    public void setDyMId(Long dyMId) {
        this.dyMId = dyMId;
    }

    public String getDyMPath() {
        return dyMPath;
    }

    public void setDyMPath(String dyMPath) {
        this.dyMPath = dyMPath;
    }

    public String getDyCusName() {
        return dyCusName;
    }

    public void setDyCusName(String dyCusName) {
        this.dyCusName = dyCusName;
    }

    @Override
    public String toString() {
        return "CusDynamic{" +
                "dyId=" + dyId +
                ", dyMId=" + dyMId +
                ", dyUuid='" + dyUuid + '\'' +
                ", dyCusUuid='" + dyCusUuid + '\'' +
                ", dyType='" + dyType + '\'' +
                ", dyCreator='" + dyCreator + '\'' +
                ", dyCreattime='" + dyCreattime + '\'' +
                ", dyContent='" + dyContent + '\'' +
                ", dySourceType='" + dySourceType + '\'' +
                ", dyZhuanUserid='" + dyZhuanUserid + '\'' +
                ", dyShareUserid='" + dyShareUserid + '\'' +
                ", dyLabelAfter='" + dyLabelAfter + '\'' +
                ", dyLabelBefore='" + dyLabelBefore + '\'' +
                ", dyDisUserid='" + dyDisUserid + '\'' +
                ", dyFollowContent='" + dyFollowContent + '\'' +
                ", dyUrl='" + dyUrl + '\'' +
                ", dyMPath='" + dyMPath + '\'' +
                ", dyCreatorName='" + dyCreatorName + '\'' +
                ", dyZhuanName='" + dyZhuanName + '\'' +
                ", dyDisName='" + dyDisName + '\'' +
                ", starttime='" + starttime + '\'' +
                ", endtime='" + endtime + '\'' +
                ", dyUsername='" + dyUsername + '\'' +
                ", creatorList=" + creatorList +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CusDynamic that = (CusDynamic) o;
        return Objects.equals(dyId, that.dyId) &&
                Objects.equals(dyUuid, that.dyUuid) &&
                Objects.equals(dyCusUuid, that.dyCusUuid) &&
                Objects.equals(dyType, that.dyType) &&
                Objects.equals(dyCreator, that.dyCreator) &&
                Objects.equals(dyCreattime, that.dyCreattime) &&
                Objects.equals(dyContent, that.dyContent) &&
                Objects.equals(dySourceType, that.dySourceType) &&
                Objects.equals(dyZhuanUserid, that.dyZhuanUserid) &&
                Objects.equals(dyShareUserid, that.dyShareUserid) &&
                Objects.equals(dyLabelAfter, that.dyLabelAfter) &&
                Objects.equals(dyLabelBefore, that.dyLabelBefore) &&
                Objects.equals(dyDisUserid, that.dyDisUserid) &&
                Objects.equals(dyFollowContent, that.dyFollowContent) &&
                Objects.equals(dyUrl, that.dyUrl) &&
                Objects.equals(dyCreatorName, that.dyCreatorName) &&
                Objects.equals(dyZhuanName, that.dyZhuanName) &&
                Objects.equals(dyDisName, that.dyDisName) &&
                Objects.equals(starttime, that.starttime) &&
                Objects.equals(endtime, that.endtime) &&
                Objects.equals(dyUsername, that.dyUsername) &&
                Objects.equals(creatorList, that.creatorList);
    }

    @Override
    public int hashCode() {
        return Objects.hash(dyId, dyUuid, dyCusUuid, dyType, dyCreator, dyCreattime, dyContent, dySourceType, dyZhuanUserid, dyShareUserid, dyLabelAfter, dyLabelBefore, dyDisUserid, dyFollowContent, dyUrl, dyCreatorName, dyZhuanName, dyDisName, starttime, endtime, dyUsername, creatorList);
    }
}